package xmlStateMachine.commands {

	import de.ghost23.common.process.ACommand;
	import flash.net.URLLoader;
	import flash.utils.Dictionary;
	import xmlStateMachine.XMLStateMachine;

	public class UnloadFile extends ACommand {

		public function UnloadFile() {
			super();
		}

		/**
		 * Starts execution of this Command. This method has to be overridden
		 * by the subclass.
		 * @param	paramContainer Reference to the bundling Parameter Container.
		 */
		override public function execute(paramContainer:Dictionary):void {

			trace("command UnloadFile is running!");
			var fileLoader:URLLoader = paramContainer[XMLStateMachine.FILE_RAW_XML];
			fileLoader.close();
			setResult(XMLStateMachine.MACHINE_RESET);
		}
	}
}